<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<script type="text/javascript">
	$(function() {
		var result = "${result}";

		result = result.replace(/&lt;br&gt;/g,"\r\n");
		result = result.replace(/&nbsp;/g," ");
		$('#result').text(result);
		
		$('#registerTreatmentEditForm').form({
			url : '${ctx}/registerTreatment/edit?registerTreatmentId=' + '${registerTreatmentId}',
			onSubmit : function() {
				progressLoad();
				var isValid = $(this).form('validate');
				if (!isValid) {
					progressClose();
				}
				return isValid;
			},
			success : function(result) {
				progressClose();
				try {
					result = $.parseJSON(result);
				} catch(err) {
					parent.$.messager.alert('错误', err, 'error');
					return;
				}
				
				if (result.status.errorCode == 0) {
					$.messager.alert('成功', result.status.errorMsg, 'info',function(r){
						parent.$.dialogHandler.dialog('close');
					});
				} else {
					parent.$.messager.alert('错误', result.status.errorMsg, 'error');
				}
			}
		});
	});
</script>
<div class="easyui-layout" data-options="fit:true,border:false" >
	<div data-options="region:'center',border:false" title="" style="padding: 3px;" >
		<form id="registerTreatmentEditForm" method="post">
			<textarea id="result" name="result" rows="11" cols="50" maxlength="512" ></textarea>
		</form>
	</div>
</div>